package com.fap.util;

public class StringUtil {

	public static String combinStringArray(String[] array, String delimiter){
		if(array.length<1)
			return "";
        int length = array.length - 1;
        if (delimiter == null) {
        	delimiter = "";
        }
        StringBuffer result = new StringBuffer(length * 8);
        for (int i = 0; i < length; i++) {
            result.append(array[i]);
            result.append(delimiter);
        }
        result.append(array[length]);
        return result.toString();		
	}
	
	public static String toUpperCaseFirstOne(String s){
		if(Character.isUpperCase(s.charAt(0)))
			return s;
		else
			return (new StringBuilder()).append(Character.toUpperCase(s.charAt(0))).append(s.substring(1)).toString();
	}
}
